import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
// import { RouterModule,Routes }   from '@angular/router';//router

//pages
import { AppComponent } from './app.component';
import { HomeComponent } from '../pages/home/home.component';
import { ActivityComponent } from '../pages/activity/activity.component';
import { ReportComponent } from '../pages/report/report.component';
import { UnsupportComponent } from '../pages/unsupport/unsupport.component';

//components
import { UserComponent } from '../components/user/user.component' 
//services
import {  LoginService } from '../services/login.service';
import { ConfigService } from '../services/config.service';
import { stampDataService } from '../services/stampData.service';
import { stampProgressService } from '../services/stampProgress.service';
import { getStampService } from '../services/getStamp.service';
// import { UIRouterModule } from "@uirouter/angular";

import { UIRouterModule } from "@uirouter/angular";
//router config 文件引入
import { uiRouterConfigFn } from "../router/router.config"; 
import { homeState,activityState,reportState,unsupportState} from "../state/state.model" 

let INITIAL_STATES = [ homeState,activityState,reportState,unsupportState ]
@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    UserComponent,
    ReportComponent,
    ActivityComponent,
    UnsupportComponent
  ],
  imports: [
    BrowserModule,
    UIRouterModule.forRoot({ states: INITIAL_STATES, 
      useHash: true, 
      config:uiRouterConfigFn })
  ],
  providers: [
    LoginService,
    ConfigService,
    stampDataService,
    stampProgressService,
    getStampService
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
